using System;
using System.Linq;
using System.Collections.Specialized;
using Basmus.Values.Web;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace Basmus.Tests.WebLink
{
    [TestClass]
    public class NameValueCollectionValueProviderTests : AbstractValueProviderTests<NameStringValuesCollectionValuesProvider>
    {
        private NameStringValuesCollectionValuesProvider _stringValuesProvider;

        private NameValueCollection _values;

        [TestInitialize]
        public void Initialize()
        {
            _values = new NameValueCollection();
            _stringValuesProvider = new NameStringValuesCollectionValuesProvider(_values);
        }

        protected override void SetStringValues(string name, string values)
        {
            _values.Set(name, values);
        }

        protected override NameStringValuesCollectionValuesProvider GetValueProvider()
        {
            return _stringValuesProvider;
        }
    }
}